package com.abaaba.project2.bean.vo;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@NoArgsConstructor
@AllArgsConstructor
public class AdminGoodsStatisticsVO {

    /**
     * errno : 0
     * data : {"columns":["day","orders","products","amount"],"rows":[{"amount":10319,"orders":20,"day":"2020-04-27","products":20},{"amount":11644,"orders":6,"day":"2021-06-05","products":9},{"amount":2282,"orders":5,"day":"2021-06-06","products":8}]}
     * errmsg : 成功
     */

    private int errno;
    private DataBean data;
    private String errmsg;

    public int getErrno() {
        return errno;
    }

    public void setErrno(int errno) {
        this.errno = errno;
    }

    public DataBean getData() {
        return data;
    }

    public void setData(DataBean data) {
        this.data = data;
    }

    public String getErrmsg() {
        return errmsg;
    }

    public void setErrmsg(String errmsg) {
        this.errmsg = errmsg;
    }

    @NoArgsConstructor
    @AllArgsConstructor
    public static class DataBean {
        private List<String> columns;
        private List<RowsBean> rows;

        public List<String> getColumns() {
            return columns;
        }

        public void setColumns(List<String> columns) {
            this.columns = columns;
        }

        public List<RowsBean> getRows() {
            return rows;
        }

        public void setRows(List<RowsBean> rows) {
            this.rows = rows;
        }

        @NoArgsConstructor
        @AllArgsConstructor
        public static class RowsBean {
            /**
             * amount : 10319
             * orders : 20
             * day : 2020-04-27
             * products : 20
             */

            private BigDecimal amount;
            private int orders;

            private String day;
            private int products;

            public BigDecimal getAmount() {
                return amount;
            }

            public void setAmount(BigDecimal amount) {
                this.amount = amount;
            }

            public int getOrders() {
                return orders;
            }

            public void setOrders(int orders) {
                this.orders = orders;
            }

            public String getDay() {
                return day;
            }

            public void setDay(String day) {
                this.day = day;
            }

            public int getProducts() {
                return products;
            }

            public void setProducts(int products) {
                this.products = products;
            }
        }
    }
}
